include_directories(
    ${CMAKE_INSTALL_PREFIX}/include
    ${CMAKE_SOURCE_DIR}/include
    ${JSON_INCLUDE_DIR}
)

link_directories(
    ${CMAKE_INSTALL_PREFIX}/lib
)

add_definitions(-DPA_UNITTEST)

add_executable(pa_unittest
    ${CMAKE_CURRENT_SOURCE_DIR}/unittest.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/model/qwen2_hub_ut.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tokenizer/qwen2_tokenizer_ut.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/vocab/vocab_ut.cpp
)

target_link_libraries(pa_unittest PRIVATE
    gmock
    gmock_main
    gtest
    gtest_main
    pa_core
    unilib
)

install(TARGETS pa_unittest
    DESTINATION bin)